package com.arpa.wms.mapper;
import com.arpa.wms.domain.dto.CustomerDTO;
import com.arpa.wms.domain.entity.Customer;
import com.arpa.wms.domain.vo.CustomerVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 客户 Mapper 接口
 * </p>
 *
 * @author LEO
 * @since 2020-09-04
 */
public interface CustomerMapper extends BaseMapper<Customer> {

    /**
     * 查询列表
     * @param customerDTO
     * @return
     */
    List<CustomerVO> queryList(CustomerDTO customerDTO);
    /**
     * 根据编码和 name 查询
     * @param customerDTO
     * @return
     */
    List<CustomerVO> queryByNameOrCode(CustomerDTO customerDTO);

    /**
     * 查询合计,包含总数
     * @param customerDTO
     * @return
     */
    CustomerVO queryListSum(CustomerDTO customerDTO);

    /**
     *  @author: Allen chen
     *  @Date: 2020/8/11 10:52
     *  @Description: 根据code 批量逻辑删除
     */
    int batchDelete(@Param("list") List<String> list , @Param("modifiedBy") String modifiedBy);

    CustomerVO getByCode(CustomerDTO customerDTO);
}
